package com.ddyx.generator.code.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 类目
 * </p>
 *
 * @author agula
 * @since 2019-08-06
 */
@TableName("p_goods_category")
public class GoodsCategory extends Model<GoodsCategory> {

    private static final long serialVersionUID=1L;

    /**
     * 类目ID
     */
    @TableId(value = "category_id", type = IdType.AUTO)
    private Integer categoryId;

    /**
     * 类目编码
     */
    private String categoryCode;

    /**
     * 父级类目编码
     */
    private String parentCode;

    /**
     * 类目名称
     */
    private String categoryName;

    /**
     * 显示名称
     */
    private String displayName;

    /**
     * 类目层级
     */
    private Integer categoryLevel;

    /**
     * 是否末级,0：否，1：是
     */
    private Integer isLeaf;

    /**
     * 是否禁用,0：否（禁用状态），1：是（启用状态），默认0
     */
    private Integer isLocked;

    /**
     * 是否删除,0：否，1：是，默认0
     */
    private Integer isDeleted;

    /**
     * 排序号
     */
    private Integer sortNo;

    /**
     * 创建时间
     */
    private LocalDateTime gmtCreate;

    /**
     * 修改时间
     */
    private LocalDateTime gmtModified;


    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryCode() {
        return categoryCode;
    }

    public void setCategoryCode(String categoryCode) {
        this.categoryCode = categoryCode;
    }

    public String getParentCode() {
        return parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public Integer getCategoryLevel() {
        return categoryLevel;
    }

    public void setCategoryLevel(Integer categoryLevel) {
        this.categoryLevel = categoryLevel;
    }

    public Integer getIsLeaf() {
        return isLeaf;
    }

    public void setIsLeaf(Integer isLeaf) {
        this.isLeaf = isLeaf;
    }

    public Integer getIsLocked() {
        return isLocked;
    }

    public void setIsLocked(Integer isLocked) {
        this.isLocked = isLocked;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public LocalDateTime getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(LocalDateTime gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    protected Serializable pkVal() {
        return this.categoryId;
    }

    @Override
    public String toString() {
        return "GoodsCategory{" +
        "categoryId=" + categoryId +
        ", categoryCode=" + categoryCode +
        ", parentCode=" + parentCode +
        ", categoryName=" + categoryName +
        ", displayName=" + displayName +
        ", categoryLevel=" + categoryLevel +
        ", isLeaf=" + isLeaf +
        ", isLocked=" + isLocked +
        ", isDeleted=" + isDeleted +
        ", sortNo=" + sortNo +
        ", gmtCreate=" + gmtCreate +
        ", gmtModified=" + gmtModified +
        "}";
    }
}
